'use strict'
import MMALL_COMM from 'util/comm.jsx';
const _comm = new MMALL_COMM();
class Cate {
    //获取商品列表
    getCateList(cateId){
        return _comm.request({
            url     : _comm.getServerHost('/manage/category/get_category.do'),
            data    : {
                categoryId : cateId || 0
            }
        });   
    }
    //修改名称
    updateCategoryName(category){
        return _comm.request({
            url     : _comm.getServerHost('/manage/category/set_category_name.do'),
            data    : category
        });
    }
    //新增分类
    addCategory(category){
        return _comm.request({
            url     : _comm.getServerHost('/manage/category/add_category.do'),
            data    : {
                parentId        : category.parentId    || 0,
                categoryName    : category.categoryName  || ''
            }
        });
    }
}
export default Cate